fix(settings): correctly detect Chrome on Android in devices & sessions#58739
Conversation
artonge
left a comment
There was a problem hiding this comment.
Hey, thanks for the PR.
Can you manually review your tests cases to ensure that they only test the result of the detect function and not its implementation. And also ensure that each test case actually make sense?
Please also address the other comments.
e5490b6 to
b484cde
Compare
0f234dc to
a17dd64
Compare
|
Hi @artonge, Thanks for the review. I have addressed all the suggested changes. Let me know if anything else is needed. Also, apologies for the noise, I accidentally rebased my branch with master, which triggered auto-assignment of several reviewers. I've since reverted to the original state. Could you help remove the extra reviewers? Best, |
Hi, I ran |
ah, sorry, run the commands within the apps/settings folder then you should see the JS changes. |
e81d75f to
65316c3
Compare
|
/compile rebase / |
|
@chandrika1993 can you allow maintainer changes? Then we can run the nextcloud bot that will compile the JS again. |
|
/compile rebase / |
|
/compile amend |
|
@chandrika1993 you need to solve the conflicts before we can merge Please run a rebase. The conflict on the dist folder you can resolve in any way you like as they'll be regenerated anyway. After you've run the rebase and resolved the conflicts, rerun |
Head branch was pushed to by a user without write access
c279871 to
c3864a5
Compare
The branch is updated now |
c3864a5 to
3ec0b55
Compare
|
you need to compile the js code again |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
3ec0b55 to
4247c60
Compare
Signed-off-by: Chandrika Mohan <chandrikalov@gmail.com> common logic to detect ua Signed-off-by: Chandrika Mohan <chandrikalov@gmail.com>
4247c60 to
38278d1
Compare
Hi @miaulalala , I've completed the rebase, resolved the dist conflicts, reran If the compiled output still doesn't look right on your end, it would be really helpful if you could run the build locally and verify, I want to make sure everything is correct before this gets merged. Thanks for your patience and support! 🙏 |
|
@AndyScherzinger or @artonge can you force merge? |
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
/settings/user/securityChrome on Android is detected as Chrome on Linux #50502Summary
Chrome on Android was incorrectly displayed as
Google Chrome (Linux)in theDevices & Sessions list at
/settings/user/security.Two compounding issues caused this:
Linux(Android is Linux-based), so thegeneric
chromeregex matched beforeandroidChromewas ever reached.Build/token is nolonger included, so the old
androidChromeregex failed to match modernAndroid Chrome entirely.
Fix:
androidChromeregex to match both modern (noBuild/) and legacy(with
Build/) Android Chrome UA formats(?![^)]*Android)tochromeandfirefoxregexesandroidChromebeforechromeinuserAgentMapas defense in depthBefore / After:
Google Chrome - 132 (Linux)❌Google Chrome for Android - 132✅❌ Before (Bug)
✅ After (Fixed)
Checklist
bug,feature: settings,3. to reviewAI (if applicable)
cc @skjnldsv @provokateurin @sorbaugh @nfebe